<template>
  <div class="h-panel">
    <PaasIndexBar></PaasIndexBar>
    <PaasPageTable :config="config" :columns="columns" id="account"></PaasPageTable>
  </div>
</template>

<script>
import PaasPageTable from "@/components/PaasPageTable";
import PaasIndexBar from "@/components/PaasIndexBar";
export default {
  mounted() {},
  components: {
    PaasPageTable,
    PaasIndexBar,
  },
  data() {
    return {
      sex: [],
      config: {},
      columns: [
        { title: "账号", prop: "account" },
        { title: "姓名", prop: "name" },
        { title: "手机号", prop: "phone" },
        { title: "邮箱", prop: "email" },
        {
          title: "性别",
          prop: "sex",
          render: (d) => this.StaticFunc.reader(this, "Sex", d.sex),
        },
        { title: "年龄", prop: "age" },
        { title: "角色权限", prop: "roleId" },
      ],
    };
  },
  methods: {
    reset() {
      var account = Vue.prototype.selection.account;
      if (!account) {
        this.$Message.warn("请选择数据");
        return;
      }
      this.$Confirm("确定重置密码？", "提示").then(() => {
        this.$axios
          .put(this.$store.state.menus.current + "/reset/" + account)
          .then((res) => {
            if (res.data.code == SUCCESS) {
              this.$Message.success(res.data.msg);
            } else {
              this.$Message.error(data.msg);
            }
          })
          .catch((err) => {
            this.$Message.error("接口" + url + "出错了");
          });
      });
    },
  },
};
</script>